package com.zx.mobile.service.proxy;

import org.apache.commons.lang3.StringUtils;

import com.zx.mobile.domain.ShareProfitRequest;
import com.zx.mobile.domain.ShareProfitResponse;
import com.zx.mobile.domain.pingan.UserAcctQueryRequest;

public class PAUserAcctQueryCommonProxy {

    /**
     * 平安用户余额合法性校验
     *
     * @return
     */
    public static String checkUserAcctQuery(UserAcctQueryRequest userAcctQueryRequest) {        
        if (StringUtils.isBlank(userAcctQueryRequest.getPartnerId())) {
            return "输入项必填";
        }
        if (StringUtils.isBlank(userAcctQueryRequest.getSign())) {
            return "输入项必填";
        }
        if (StringUtils.isBlank(userAcctQueryRequest.getUserId())) {
            return "输入项必填";
        }
        //签名验证
        if (!PASignHelper.checkRequestSign(userAcctQueryRequest, userAcctQueryRequest.getSign())) {
            return "签名验证失败";
        }
        return null;
    }

    /**
     * 平安用户余额信息
     *
     * @param shareProfitRequest
     * @return
     */
    public static ShareProfitResponse getShareProfitResponse(
    		ShareProfitRequest shareProfitRequest) {
    	ShareProfitResponse shareProfitResponse = new ShareProfitResponse();
    	shareProfitResponse.setReturnCode("0000");
    	shareProfitResponse.setReturnMsg("分享收益获取成功");
        return shareProfitResponse;
    }
}
